<%--
功能: 商品评论回复
--%>
<%@ tag body-content="scriptless"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ attribute name="selectorId" required="true" rtexprvalue="true" type="java.lang.String" description="selector id"%>
<%@ attribute name="callbackFunc" required="false" rtexprvalue="true" type="java.lang.String" description="回调函数"%>

<c:set var="ui_dialog" value="true" scope="request"/>
<fmt:message key="productReviewReplyList.heading" var="title"/>	
<div id="divDlg${selectorId}" style="visibility:hidden;position:absolute;overflow: auto;">
	<iframe id="${selectorId}Iframe"  name="${selectorId}Iframe" frameborder="0"  width="100%" height="550" scrolling="no">
		<!-- 放置内容 fillDiv -->
	</iframe>
</div>

<script type="text/javascript" defer>

var ui_dialog_${selectorId};
var ${selectorId}Iframe = $j("#${selectorId}Iframe")[0];
var ${selectorId}CallbackFunc = eval(${callbackFunc});;
var ${selectorId}HasLoad = false;
var ${selectorId}CurrParentId = null;
$j(document).ready(function(){
	ui_dialog_${selectorId} = $j("#divDlg${selectorId}"); 
}); 

//模拟重写打开dialog方法
function showDialogOf${selectorId}(parentId)
{
	ui_dialog_${selectorId}.css("visibility","visible");
	if(!${selectorId}HasLoad){
		ui_dialog_${selectorId}.dialog({beforeclose:beforecloseOf${selectorId}, title:"${title}", modal: true, resizable:false,height:600, width:800, bgiframe: true,overlay: { opacity: 0.5, background: "black" } });
		${selectorId}HasLoad = true;
	}	
	${selectorId}Iframe.src = __ctxPath + "/customer/productReviewReply/windowPage.html?parentId="+parentId;
	${selectorId}CurrParentId = parentId;
	ui_dialog_${selectorId}.dialog("open");
	
}

//模拟重写关闭dialog方法
function closeDialogOf${selectorId}()
{
	ui_dialog_${selectorId}.dialog("close");
}
//窗体关闭前的函数
function beforecloseOf${selectorId}(){
	${selectorId}Iframe.src = __ctxPath + '/loading.html?decorator=windowPage';
	${selectorId}CallbackFunc.call(this,${selectorId}CurrParentId);
	${selectorId}CurrParentId = null;
}

</script>